#ifndef HANA_H
#define HANA_H

#include "channel.h"
#include "port.h"
#include "node.h"

#include "ip/trunner.h"

#include "ip/peer_cluster.h"

typedef struct NodeHanaParam
{
    int multiplexer;
    int peer_id_base;
    int num_of_peer_group;
    int num_of_peer;
    int softmem_size;
    int num_of_main_memory;
    int num_of_alu;
    int total_peers;
    List<int> base_ptrs;
} NodeHanaParam;

class NodeHana : public Node
{
public:
    ChannelTranOpFabricReceiver * port_top_receiver;
    ChannelExecOpFabricReceiver * port_eop_receiver;
    List<ChannelLoadFabricReceiver *> port_memory_receivers;
    List<ChannelStoreFabricSender *> port_memory_senders;
    List<ChannelLoadReqFabricSender *> port_memory_requester;
    PortOut<bool> * port_halt;
    NodeTRunner * node_trunner;
    NodePeerCluster * node_cluster;

    NodeHana(Node *parent, NodeHanaParam params);
    NodeTaskList tasks() const override;
};

#endif // HANA_H